package UI;

public class Login {
	
	public void showUI(){
		javax.swing.JFrame jf=new javax.swing.JFrame("Login");
		jf.setSize(300, 200);
		
		java.awt.FlowLayout fl=new java.awt.FlowLayout(0,10,20);
		jf.setLayout(fl);
		
		javax.swing.JMenuBar mb=new javax.swing.JMenuBar();

		javax.swing.JMenu m_file=new javax.swing.JMenu("File");
		javax.swing.JMenu m_help=new javax.swing.JMenu("Help");
		
	    javax.swing.JMenuItem f_new=new javax.swing.JMenuItem("New");
	    javax.swing.JMenuItem f_open=new javax.swing.JMenuItem("Open");
	    javax.swing.JMenuItem f_save=new javax.swing.JMenuItem("Save");
	    javax.swing.JMenuItem f_call=new javax.swing.JMenuItem("Call");
	    
	    javax.swing.JMenuItem h_about=new javax.swing.JMenuItem("About");
	    javax.swing.JMenuItem h_buy=new javax.swing.JMenuItem("Buy");
	    javax.swing.JMenuItem h_sign=new javax.swing.JMenuItem("Sign in");   
	    
	    java.awt.event.ActionListener sign=new SignListener();
	    h_sign.addActionListener(sign);
	    
	    java.awt.event.ActionListener about=new AboutListener();
	    h_about.addActionListener(about);
	    
	    java.awt.event.ActionListener call=new CallListener();
	    f_call.addActionListener(call);
	    m_file.add(f_new);
	    m_file.add(f_open);
	    m_file.add(f_save);
	    m_file.add(f_call);
	    
	    m_help.add(h_about);
	    m_help.add(h_buy);
	    m_help.add(h_sign);
	    
	    mb.add(m_file);
	    mb.add(m_help);
	    


		javax.swing.JLabel l_num=new javax.swing.JLabel("account    ");
		javax.swing.JLabel l_psw=new javax.swing.JLabel("password");	
		javax.swing.JTextField t_num=new javax.swing.JTextField(15);
		javax.swing.JTextField t_psw=new javax.swing.JTextField(15);
		javax.swing.JButton b_log=new javax.swing.JButton("Log in");
		javax.swing.JButton b_sign=new javax.swing.JButton("Sign in");
			    
		jf.setJMenuBar(mb);
		jf.add(l_num);
		jf.add(t_num);
		jf.add(l_psw);
		jf.add(t_psw);
		jf.add(b_log);
		jf.add(b_sign);
		
		java.awt.event.ActionListener log=new LoginListener();
		b_log.addActionListener(log);
		

		b_sign.addActionListener(sign);
		
		jf.setResizable(false);
		jf.setVisible(true);
	}
	

}
